﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HUST.JackRiver.Demo.Doc2Text
{
    class Tester
    {
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("Enter File Path:");
                string input = Console.ReadLine();
                Doc2TextConverter converter = new Doc2TextConverter(input);
                string result = converter.Convert();
                if (result != "")
                {
                    Console.WriteLine("Result:");
                    Console.WriteLine(result);
                    Console.WriteLine("EOF");
                }
                else
                {
                    Console.WriteLine("Error!");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Fatal Error:{0}", e.Message);
            }
            finally
            {
                Console.ReadKey();
            }
        }
    }
}
